import alertHtml from 'ngtemplate!html!../../../tpls/common/alert.html';

/* 鼠标滑过提示文本 */
class iAlert{
    constructor(){
        this.restrict    = 'EA';
        this.templateUrl = alertHtml;
        this.replace     = true;
        this.transclude  = true;
    }

    link(scope, element, attrs, controller) {
        var body  = angular.element('body'),
            close = element.find('.notice-close');

        close.on('click', function() {
            body.removeClass("notice-open");
        })
    }
}

export default iAlert;